home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / gtksourceview-2.0 / language-specs / changelog.lang < prev    next >
Extensible Markup Language  |  2009-10-02  |  3KB  |  92 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Authors: Jacob Ils├╕ Christensen, Paolo Borelli
  5.  Copyright (C) 2005 Jacob Ils├╕ Christensen <jacobilsoe@gmail.com>
  6.  Copyright (C) 2005 Paolo Borelli <pborelli@katamail.com>
  7.  
  8.  This library is free software; you can redistribute it and/or
  9.  modify it under the terms of the GNU Library General Public
  10.  License as published by the Free Software Foundation; either
  11.  version 2 of the License, or (at your option) any later version.
  12.  
  13.  This library is distributed in the hope that it will be useful,
  14.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  Library General Public License for more details.
  17.  
  18.  You should have received a copy of the GNU Library General Public
  19.  License along with this library; if not, write to the
  20.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.  Boston, MA 02111-1307, USA.
  22.  
  23. -->
  24. <language id="changelog" _name="ChangeLog" version="2.0" _section="Others">
  25.  
  26.   <metadata>
  27.     <property name="mimetypes">text/x-changelog</property>
  28.     <property name="globs">ChangeLog*</property>
  29.   </metadata>
  30.  
  31.   <styles>
  32.     <style id="date" _name="Date" map-to="def:number"/>
  33.     <style id="name" _name="Name" map-to="def:statement"/>
  34.     <style id="email" _name="E-mail address" map-to="def:identifier"/>
  35.     <style id="file" _name="File" map-to="def:comment"/>
  36.     <style id="bullet" _name="Bullet" map-to="def:type"/>
  37.     <style id="function" _name="Function" map-to="def:function"/>
  38.     <style id="release" _name="Release" map-to="def:statement"/>
  39.   </styles>
  40.  
  41.   <definitions>
  42.     <define-regex id="identifier">[A-Za-z_][A-Za-z0-9_]*</define-regex>
  43.     <define-regex id="weekday">Mon|Tue|Wed|Thu|Fri|Sat|Sun</define-regex>
  44.     <define-regex id="month">Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec</define-regex>
  45.  
  46.     <define-regex id="date" extended="true">
  47.       \%{weekday}\s+\%{month}\s+\d{1,2}\s+(\d{1,2}:\d{1,2}:\d{1,2}\s+)?([aApP][mM]\s+)?(\w{3}\s+)?\d{4} |   # Wed Jun 27 13:27:21 2007
  48.       \d{4}-\d{2}-\d{2}                                                       # 2007-06-28
  49.     </define-regex>
  50.  
  51.     <context id="changelog">
  52.       <include>
  53.  
  54.         <context id="date-and-stuff">
  55.           <!-- FIXME: how to match date here? The date and name line is
  56.             something like (DATE) (NAME) <EMAIL>, where DATE and NAME may
  57.             be quite arbitrary. -->
  58.           <match extended="true">
  59.             ^(?P<date>\%{date})\s+
  60.             (?P<name>.*)\s*
  61.             (?P<email>\<[^\<]+\>)\s*$
  62.           </match>
  63.           <include>
  64.             <context sub-pattern="date" style-ref="date"/>
  65.             <context sub-pattern="name" style-ref="name"/>
  66.             <context sub-pattern="email" style-ref="email"/>
  67.           </include>
  68.         </context>
  69.  
  70.         <context id="release" style-ref="release">
  71.           <match>^\s*\=.*\=\s*$</match>
  72.         </context>
  73.  
  74.         <context id="file" style-ref="file">
  75.           <start>^\s+(\*)</start>
  76.           <!-- end at blank lines if there's no colon -->
  77.           <end>\:|^(?!\S)</end>
  78.           <include>
  79.             <context sub-pattern="1" where="start" style-ref="bullet"/>
  80.           </include>
  81.         </context>
  82.  
  83.         <context id="function" style-ref="function">
  84.           <match>\(\s*\%{identifier}\s*\)</match>
  85.         </context>
  86.  
  87.       </include>
  88.     </context>
  89.   </definitions>
  90.  
  91. </language>
  92.